<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <%@ page language="java" contentType="text/html; charset=UTF-8"
           pageEncoding="UTF-8"%>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <title></title>
  <link type="text/css" rel="stylesheet" href="css/style.css" />
  <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
  <base href="<%=request.getServletContext().getContextPath() %>/">
  <script type="text/javascript">
    $(document).ready(function () {
      var height=$(document).height();
      $('body').css('height',height);
      var mart=height-500;
      mart = mart/2;
      $('.loginBox').css('marginTop',mart);
    })

    $(function(){
      $("#name").focus(function(){
        console.log("123")
        $("#msg").hide();
      });
    })

    $(function(){
      $("#submit").click(function(){
        $("#from").submit();
      });
    })

  </script>
</head>

<body>
<div class="loginBox">
  <h1>欢迎登陆</h1>
  <form action="/login" method="post" id="from">
    <input type="hidden" id="id" name="id" value="login"  />
    <div class="item">
      <div class="icon"><img src="images/icon1.png" /></div>
      <div class="txt"><input name="name" id="name" type="text" placeholder="请输入您的用户名"/></div>
    </div>
    <div class="item">
      <div class="icon"><img src="images/icon2.png" /></div>
      <div class="txt"><input name="password" type="password" value="${cookie.password.value}" placeholder="请输入您的密码"/></div>
    </div>
    <div class="item_2">

      <div class="checkbox">
      <input name="rememberMe" type="checkbox" id="rememberMe" onclick="remember();" value="" />
      <span>记住密码</span>
      </div>

      <div>
      <a href="psd.html">忘记密码？</a>
      </div>
    </div>
  </form>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font id="msg" name="user" style="color: red; ">${msg}</font>
  <div class="item_3">
    <input name="" id="submit" type="submit" value="安全登录" class="btn"/>
  </div>
  <div class="item_4">
    还没有账号？<a href="register.html" style="color: white;">立即注册</a>
  </div>
</div>
</body>
</html>
